import { RouteRecordRaw } from 'vue-router';

export const commonRouter: Array<RouteRecordRaw> = [{
    path: 'element',
    name: 'element',
    meta: {
        label: 'element'
    },
    children: [{
        path: 'el-form',
        name: 'el-form',
        meta: {
            label: 'el-form'
        },
        children: [{
            path: 'general-object',
            name: 'general-object',
            meta: {
                label: '普通对象'
            },
            component: () => import('@/page/element/001-el-form-普通对象.vue'),
        }, {
            path: 'dynamic-arr-of-obj',
            name: 'dynamic-arr-of-obj',
            meta: {
                label: '对象嵌套动态数组'
            },
            component: () => import('@/page/element/002-el-form-对象嵌套动态数组.vue'),
        }, {
            path: 'dynamic-arr',
            name: 'dynamic-arr',
            meta: {
                label: '动态数组'
            },
            component: () => import('@/page/element/003-el-form-动态数组.vue'),
        }]
    }]
}, {
    path: 'hook',
    name: 'hook',
    meta: {
        label: 'hook'
    },
    children: [{
        path: 'plain-table-hook',
        name: 'plain-table-hook',
        meta: {
            label: '简单的表格 hook 封装'
        },
        component: () => import('@/page/hook/001-简单的表格 hook 封装/demo.vue'),
    }, {
        path: 'different-api-hook',
        name: 'different-api-hook',
        meta: {
            label: '支持不同接口不同传参'
        },
        component: () => import('@/page/hook/002-支持不同接口不同传参/demo.vue'),
    }]
}, {
    path: 'websocket',
    name: 'websocket',
    meta: {
        label: 'websocket'
    },
    children: [{
        path: 'websocket-example',
        name: 'websocket-example',
        meta: {
            label: 'websocket 实现'
        },
        component: () => import('@/page/websocket/index.vue'),
    }]
}, {
    path: 'more-theme',
    name: 'moreTheme',
    meta: {
        label: 'moreTheme'
    },
    children: [{
        path: 'more-theme-example',
        name: 'more-theme-example',
        meta: {
            label: 'more-theme'
        },
        component: () => import('@/page/more-theme/index.vue'),
    }]
}, {
    path: 'template-demo',
    name: 'templateDemo',
    meta: {
        label: 'templateDemo'
    },
    children: [{
        path: 'login-demo',
        name: 'login-demo',
        meta: {
            label: 'login-demo'
        },
        component: () => import('@/page/template/login.vue'),
    }, {
        path: 'login-success-page',
        name: 'login-success-page',
        meta: {
            label: 'login-success-page'
        },
        component: () => import('@/page/template/login-success.vue'),
    }, {
        path: 'autocomplete',
        name: 'autocomplete',
        meta: {
            label: 'autocomplete'
        },
        component: () => import('@/page/template/autocomplete.vue'),
    }, {
        path: 'order-display-popup',
        name: 'order-display-popup',
        meta: {
            label: 'order-display-popup'
        },
        component: () => import('@/page/template/order-display-popup.vue'),
    }]
}, {
    path: 'threejs',
    name: 'threejs',
    meta: {
        label: 'threejs'
    },
    children: [{
        path: '1-simple-demo',
        name: '1-simple-demo',
        meta: {
            label: '1-simple-demo'
        },
        component: () => import('@/page/threejs/1-simple-demo.vue'),
    }]
}, {
    path: 'others',
    name: 'others',
    meta: {
        label: 'others'
    },
    children: [{
        path: '1-file-upload',
        name: '1-file-upload',
        meta: {
            label: '1-file-upload'
        },
        component: () => import('@/page/others/1-file-upload.vue'),
    }]
}]